package com.model_gdw.controller;

import entity.ModelUser;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;

@RestController
public class HelloController {
    @GetMapping("/hello")
    public String hello(){
        ModelUser build = ModelUser.builder().id(1234L).name("梁艳")
                .phone("17711002179").password("1234")
                .remark("你好").submitTime(LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"))).build();
        return build.toString();
    }
}
